﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Qianli.DirSir.DAL;
using Qianli.DirSir.Model;
using System.Data;
namespace Qianli.DirSir.BLL
{
   public class OrderInfoBLL
    {
       OrderInfoDAL DAL = new OrderInfoDAL();
        /// <summary>
        /// 添加商品订单信息
        /// </summary>
        /// <param name="oo"></param>
        /// <returns></returns>
        public int AddOrderInfo(OrderInfo oo, string xml)
        {

            return DAL.AddOrderInfo(oo, xml);
        }
       /// <summary>
       /// 获取订单信息
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>  
        public List<OrderInfo> ShowOrderInfo()
        {
            return DAL.ShowOrderInfo();
        }
        /// <summary>
        /// 根据ID获取订单子表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<OrderSonInfo> oo(int id)
        {
            return DAL.oo(id);
        }
        /// <summary>
        /// 根据ID获取订单主表信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public OrderInfo GetOrderInfoByid(int id)
        {
            return DAL.GetOrderInfoByid(id);
        }
        /// <summary>
        /// 商品入库，增加库存数量
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        public int Add_ruku(int orderID)
        {
            return DAL.Add_ruku(orderID);
        }
        /// <summary>
        /// 根据年，月，日
        /// </summary>
        /// <param name="StartTime"></param>
        /// <param name="End_Time"></param>
        /// <returns></returns>
        public List<OrderInfo> SelYear(string StartTime, string EndTime)
        {
            return DAL.SelYear(StartTime,EndTime);
        }
        public List<OrderInfo> SelMonth(string StartTime,string EndTime, string YearTime)
        {
            return DAL.SelMonth(StartTime,EndTime,YearTime);
        }
        public List<OrderInfo> SelDay(string StartTime,string EndTime, string YearTime, string MonthTime)
        {
            return DAL.SelDay(StartTime,EndTime,YearTime,MonthTime);
        }
        /// <summary>
        /// 根据ID获取订单状态
        /// </summary>
        /// <returns></returns>
        public int GetByOrder(int id)
        {
            return DAL.GetByOrder(id);
        }
    }
}
